package demo.util;

import org.codehaus.commons.compiler.CompileException;
import org.codehaus.janino.*;

import java.lang.reflect.InvocationTargetException;

public class JaninoDemo {

    public static void main(String[] args) throws CompileException, InvocationTargetException {
        ExpressionEvaluator ee = new ExpressionEvaluator();
        ee.cook("3 + 4");
        System.out.println(ee.evaluate()); // Prints "7"

    }
}
